home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / AIncludes / CMMComponent.a < prev    next >
Encoding:
Text File  |  1995-04-18  |  7.7 KB  |  370 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMMComponent.a
  3. ;
  4. ;    Contains:    ColorSync CMM Components
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.0
  7. ;                Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__CMMCOMPONENT__') = 'UNDEFINED' THEN
  21. __CMMCOMPONENT__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  30.     include 'Quickdraw.a'
  31.     ENDIF
  32. ;        include 'MixedMode.a'                                        ;
  33. ;        include 'QuickdrawText.a'                                    ;
  34.  
  35.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  36.     include 'Components.a'
  37.     ENDIF
  38.  
  39.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  40.     include 'CMApplication.a'
  41.     ENDIF
  42. ;        include 'Files.a'                                            ;
  43. ;            include 'OSUtils.a'                                    ;
  44. ;                include 'Memory.a'                                    ;
  45. ;        include 'Printing.a'                                        ;
  46. ;            include 'Errors.a'                                        ;
  47. ;            include 'Dialogs.a'                                    ;
  48. ;                include 'Windows.a'                                ;
  49. ;                    include 'Events.a'                                ;
  50. ;                    include 'Controls.a'                            ;
  51. ;                        include 'Menus.a'                            ;
  52. ;                include 'TextEdit.a'                                ;
  53. ;        include 'CMICCProfile.a'                                    ;
  54.  
  55. CMMInterfaceVersion                EQU        1
  56.  
  57. ; Component function selectors 
  58. ; Required 
  59. kCMMInit                        EQU        0
  60. kNCMMInit                        EQU        6
  61. kCMMMatchColors                    EQU        1
  62. kCMMCheckColors                    EQU        2
  63.  
  64. ; Optional 
  65. kCMMValidateProfile                EQU        8
  66. kCMMFlattenProfile                EQU        14
  67. kCMMUnflattenProfile            EQU        15
  68. kCMMMatchBitmap                    EQU        9
  69. kCMMCheckBitmap                    EQU        10
  70. kCMMMatchPixMap                    EQU        3
  71. kCMMCheckPixMap                    EQU        4
  72. kCMMConcatenateProfiles            EQU        5
  73. kCMMConcatInit                    EQU        7
  74. kCMMNewLinkProfile                EQU        16
  75. kCMMGetPS2ColorSpace            EQU        11
  76. kCMMGetPS2ColorRenderingIntent    EQU        12
  77. kCMMGetPS2ColorRendering        EQU        13
  78. kCMMGetPS2ColorRenderingVMSize    EQU        17
  79.  
  80. ;
  81. ; pascal CMError NCMInit(ComponentInstance CMSession, CMProfileRef srcProfile, CMProfileRef dstProfile)
  82. ;
  83.     IF ¬ GENERATINGCFM THEN
  84.         Macro
  85.         _NCMInit
  86.             dc.w     $2F3C
  87.             dc.w     $0008
  88.             dc.w     $0006
  89.             moveq    #0,d0
  90.             dc.w     $A82A
  91.         EndM
  92.     ELSE
  93.         IMPORT_CFM_FUNCTION    NCMInit
  94.     ENDIF
  95.  
  96. ;
  97. ; pascal CMError CMInit(ComponentInstance CMSession, CMProfileHandle srcProfile, CMProfileHandle dstProfile)
  98. ;
  99.     IF ¬ GENERATINGCFM THEN
  100.         Macro
  101.         _CMInit
  102.             dc.w     $2F3C
  103.             dc.w     $0008
  104.             dc.w     $0000
  105.             moveq    #0,d0
  106.             dc.w     $A82A
  107.         EndM
  108.     ELSE
  109.         IMPORT_CFM_FUNCTION    CMInit
  110.     ENDIF
  111.  
  112. ;
  113. ; pascal CMError CMMatchColors(ComponentInstance CMSession, CMColor *myColors, unsigned long count)
  114. ;
  115.     IF ¬ GENERATINGCFM THEN
  116.         Macro
  117.         _CMMatchColors
  118.             dc.w     $2F3C
  119.             dc.w     $0008
  120.             dc.w     $0001
  121.             moveq    #0,d0
  122.             dc.w     $A82A
  123.         EndM
  124.     ELSE
  125.         IMPORT_CFM_FUNCTION    CMMatchColors
  126.     ENDIF
  127.  
  128. ;
  129. ; pascal CMError CMCheckColors(ComponentInstance CMSession, CMColor *myColors, unsigned long count, long *result)
  130. ;
  131.     IF ¬ GENERATINGCFM THEN
  132.         Macro
  133.         _CMCheckColors
  134.             dc.w     $2F3C
  135.             dc.w     $000C
  136.             dc.w     $0002
  137.             moveq    #0,d0
  138.             dc.w     $A82A
  139.         EndM
  140.     ELSE
  141.         IMPORT_CFM_FUNCTION    CMCheckColors
  142.     ENDIF
  143.  
  144. ; Optional functions 
  145. ;
  146. ; pascal CMError CMMValidateProfile(ComponentInstance CMSession, CMProfileRef prof, Boolean *valid)
  147. ;
  148.     IF ¬ GENERATINGCFM THEN
  149.         Macro
  150.         _CMMValidateProfile
  151.             dc.w     $2F3C
  152.             dc.w     $0008
  153.             dc.w     $0008
  154.             moveq    #0,d0
  155.             dc.w     $A82A
  156.         EndM
  157.     ELSE
  158.         IMPORT_CFM_FUNCTION    CMMValidateProfile
  159.     ENDIF
  160.  
  161. ;
  162. ; pascal CMError CMMFlattenProfile(ComponentInstance CMSession, CMProfileRef prof, unsigned long flags, CMFlattenUPP proc, void *refCon)
  163. ;
  164.     IF ¬ GENERATINGCFM THEN
  165.         Macro
  166.         _CMMFlattenProfile
  167.             dc.w     $2F3C
  168.             dc.w     $0010
  169.             dc.w     $000E
  170.             moveq    #0,d0
  171.             dc.w     $A82A
  172.         EndM
  173.     ELSE
  174.         IMPORT_CFM_FUNCTION    CMMFlattenProfile
  175.     ENDIF
  176.  
  177. ;
  178. ; pascal CMError CMMUnflattenProfile(ComponentInstance CMSession, FSSpec *resultFileSpec, CMFlattenUPP proc, void *refCon)
  179. ;
  180.     IF ¬ GENERATINGCFM THEN
  181.         Macro
  182.         _CMMUnflattenProfile
  183.             dc.w     $2F3C
  184.             dc.w     $000C
  185.             dc.w     $000F
  186.             moveq    #0,d0
  187.             dc.w     $A82A
  188.         EndM
  189.     ELSE
  190.         IMPORT_CFM_FUNCTION    CMMUnflattenProfile
  191.     ENDIF
  192.  
  193. ;
  194. ; pascal CMError CMMatchBitmap(ComponentInstance CMSession, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *matchedBitmap)
  195. ;
  196.     IF ¬ GENERATINGCFM THEN
  197.         Macro
  198.         _CMMatchBitmap
  199.             dc.w     $2F3C
  200.             dc.w     $0010
  201.             dc.w     $0009
  202.             moveq    #0,d0
  203.             dc.w     $A82A
  204.         EndM
  205.     ELSE
  206.         IMPORT_CFM_FUNCTION    CMMatchBitmap
  207.     ENDIF
  208.  
  209. ;
  210. ; pascal CMError CMCheckBitmap(ComponentInstance CMSession, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *resultBitmap)
  211. ;
  212.     IF ¬ GENERATINGCFM THEN
  213.         Macro
  214.         _CMCheckBitmap
  215.             dc.w     $2F3C
  216.             dc.w     $0010
  217.             dc.w     $000A
  218.             moveq    #0,d0
  219.             dc.w     $A82A
  220.         EndM
  221.     ELSE
  222.         IMPORT_CFM_FUNCTION    CMCheckBitmap
  223.     ENDIF
  224.  
  225. ;
  226. ; pascal CMError CMMatchPixMap(ComponentInstance CMSession, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon)
  227. ;
  228.     IF ¬ GENERATINGCFM THEN
  229.         Macro
  230.         _CMMatchPixMap
  231.             dc.w     $2F3C
  232.             dc.w     $000C
  233.             dc.w     $0003
  234.             moveq    #0,d0
  235.             dc.w     $A82A
  236.         EndM
  237.     ELSE
  238.         IMPORT_CFM_FUNCTION    CMMatchPixMap
  239.     ENDIF
  240.  
  241. ;
  242. ; pascal CMError CMCheckPixMap(ComponentInstance CMSession, const PixMap *myPixMap, CMBitmapCallBackUPP progressProc, BitMap *myBitMap, void *refCon)
  243. ;
  244.     IF ¬ GENERATINGCFM THEN
  245.         Macro
  246.         _CMCheckPixMap
  247.             dc.w     $2F3C
  248.             dc.w     $0010
  249.             dc.w     $0004
  250.             moveq    #0,d0
  251.             dc.w     $A82A
  252.         EndM
  253.     ELSE
  254.         IMPORT_CFM_FUNCTION    CMCheckPixMap
  255.     ENDIF
  256.  
  257. ;
  258. ; pascal CMError CMConcatInit(ComponentInstance CMSession, CMConcatProfileSet *profileSet)
  259. ;
  260.     IF ¬ GENERATINGCFM THEN
  261.         Macro
  262.         _CMConcatInit
  263.             dc.w     $2F3C
  264.             dc.w     $0004
  265.             dc.w     $0007
  266.             moveq    #0,d0
  267.             dc.w     $A82A
  268.         EndM
  269.     ELSE
  270.         IMPORT_CFM_FUNCTION    CMConcatInit
  271.     ENDIF
  272.  
  273. ;
  274. ; pascal CMError CMNewLinkProfile(ComponentInstance CMSession, CMProfileRef *prof, const CMProfileLocation *targetLocation, CMConcatProfileSet *profileSet)
  275. ;
  276.     IF ¬ GENERATINGCFM THEN
  277.         Macro
  278.         _CMNewLinkProfile
  279.             dc.w     $2F3C
  280.             dc.w     $000C
  281.             dc.w     $0010
  282.             moveq    #0,d0
  283.             dc.w     $A82A
  284.         EndM
  285.     ELSE
  286.         IMPORT_CFM_FUNCTION    CMNewLinkProfile
  287.     ENDIF
  288.  
  289. ;
  290. ; pascal CMError CMMGetPS2ColorSpace(ComponentInstance CMSession, CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
  291. ;
  292.     IF ¬ GENERATINGCFM THEN
  293.         Macro
  294.         _CMMGetPS2ColorSpace
  295.             dc.w     $2F3C
  296.             dc.w     $0010
  297.             dc.w     $000B
  298.             moveq    #0,d0
  299.             dc.w     $A82A
  300.         EndM
  301.     ELSE
  302.         IMPORT_CFM_FUNCTION    CMMGetPS2ColorSpace
  303.     ENDIF
  304.  
  305. ;
  306. ; pascal CMError CMMGetPS2ColorRenderingIntent(ComponentInstance CMSession, CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
  307. ;
  308.     IF ¬ GENERATINGCFM THEN
  309.         Macro
  310.         _CMMGetPS2ColorRenderingIntent
  311.             dc.w     $2F3C
  312.             dc.w     $0010
  313.             dc.w     $000C
  314.             moveq    #0,d0
  315.             dc.w     $A82A
  316.         EndM
  317.     ELSE
  318.         IMPORT_CFM_FUNCTION    CMMGetPS2ColorRenderingIntent
  319.     ENDIF
  320.  
  321. ;
  322. ; pascal CMError CMMGetPS2ColorRendering(ComponentInstance CMSession, CMProfileRef srcProf, CMProfileRef dstProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
  323. ;
  324.     IF ¬ GENERATINGCFM THEN
  325.         Macro
  326.         _CMMGetPS2ColorRendering
  327.             dc.w     $2F3C
  328.             dc.w     $0014
  329.             dc.w     $000D
  330.             moveq    #0,d0
  331.             dc.w     $A82A
  332.         EndM
  333.     ELSE
  334.         IMPORT_CFM_FUNCTION    CMMGetPS2ColorRendering
  335.     ENDIF
  336.  
  337. ;
  338. ; pascal CMError CMMGetPS2ColorRenderingVMSize(ComponentInstance CMSession, CMProfileRef srcProf, CMProfileRef dstProf, unsigned long *vmSize)
  339. ;
  340.     IF ¬ GENERATINGCFM THEN
  341.         Macro
  342.         _CMMGetPS2ColorRenderingVMSize
  343.             dc.w     $2F3C
  344.             dc.w     $000C
  345.             dc.w     $0011
  346.             moveq    #0,d0
  347.             dc.w     $A82A
  348.         EndM
  349.     ELSE
  350.         IMPORT_CFM_FUNCTION    CMMGetPS2ColorRenderingVMSize
  351.     ENDIF
  352.  
  353. ;
  354. ; pascal CMError CMConcatenateProfiles(ComponentInstance CMSession, CMProfileHandle thru, CMProfileHandle dst, CMProfileHandle *newDst)
  355. ;
  356.     IF ¬ GENERATINGCFM THEN
  357.         Macro
  358.         _CMConcatenateProfiles
  359.             dc.w     $2F3C
  360.             dc.w     $000C
  361.             dc.w     $0005
  362.             moveq    #0,d0
  363.             dc.w     $A82A
  364.         EndM
  365.     ELSE
  366.         IMPORT_CFM_FUNCTION    CMConcatenateProfiles
  367.     ENDIF
  368.  
  369.     ENDIF ; __CMMCOMPONENT__
  370.